<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue.directive 自定义指令</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>Vue.directive 自定义指令</h1>
    <hr>
    <div id="app">
        <p>{{count}}</p>
        <button v-on:click="add">add</button>
    </div>
    <script>
        var app = new Vue({
            el : "#app",
            data : {
                count : 0
            },
            methods : {
                add : function () {
                    this.count++;
                }
            }
        })
    </script>
</body>
</html>